package com.shopping.mall.core.module.goodsSpecification.entity;

import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class NumPriceList {

    private String specificationId;

    private List<NumPrice> numPriceList;

    public static Map<String,List<NumPrice>> toMap(List<NumPriceList> numPriceLists){
        Map<String,List<NumPrice>> numPriceListMap=new HashMap<>();
        for(NumPriceList numPriceList:numPriceLists){
            numPriceListMap.put(numPriceList.getSpecificationId(),numPriceList.getNumPriceList());
        }
        return numPriceListMap;
    }
}
